package cn.humaohua.study.yanmo_design_pattern.ch04.v1;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public enum LogModelUtil {
    INSTANCE;

    private static SimpleDateFormat sdf = new SimpleDateFormat(
            "yyyy-MM-dd HH:mm:ss");

    public List<LogModel> genLogModel() {
        // 构建日志对象
        LogModel logModel = new LogModel();
        logModel.setLogId("1");
        logModel.setOperateUser("maohua");
        logModel.setOperateTime(sdf.format(new Date()));
        logModel.setLogContent("学习设计模式");

        List<LogModel> list = new ArrayList<>();
        list.add(logModel);
        return list;
    }
}
